package com.lvkerry.orderfood.controller

import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.ResponseBody

@Controller
class MainController {

    @GetMapping(value = ["/", "/index"])
    fun index(): String {
        return "index"
    }

    @GetMapping("/login")
    fun login(): String {
        return "login"
    }

    @GetMapping("/access-denied")
    fun accessDenied(): String {
        return "access-denied"
    }


    @ResponseBody
    @PostMapping("/test")
    fun test() = "/test data"


}